<?php
/**
 * Description of MySQL_DAO
 *
 * @author Ronicus
 */

class MySQL_DAO {
    const DB_HOST = 'localhost';
    const DB_USER = 'ron';
    const DB_PASSWORD = '130273';
    const DB_NAME = 'dreambook';

    function __construct(){
    }
    
	public function connect(){
       	$conn = new mysqli(self::DB_HOST, self::DB_USER, self::DB_PASSWORD, self::DB_NAME);
		if(!$conn){
			die('Could not connect: ' . mysql_error());
		}
		return $conn;
	}

	public function close($connection){
		mysql_close($connection);
	}      
}

?>
